.xblock--drag-and-drop--editor {
  width: 100%;
  height: 100%;
}
.modal-window .drag-builder  {
    width: 100%;
    height: calc(100% - 60px);
    position: absolute;
    overflow-y: scroll;
}

/*** Drop Target ***/
.xblock--drag-and-drop--editor .zone {
    position: absolute;

    display: -webkit-box;
    display: -moz-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;

    /* Internet Explorer 10 */
    -ms-flex-pack:center;
    -ms-flex-align:center;

    /* Firefox */
    -moz-box-pack:center;
    -moz-box-align:center;

    /* Safari, Opera, and Chrome */
    -webkit-box-pack:center;
    -webkit-box-align:center;

    /* W3C */
    box-pack:center;
    box-align:center;

    border: 1px dotted #565656;
    box-sizing: border-box;
}

.xblock--drag-and-drop--editor .zone p {
    width: 100%;
    font-family: Arial;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    margin-top: auto;
    margin-bottom: auto;
}

/** Builder **/
.xblock--drag-and-drop--editor .hidden {
    display: none !important;
}

.xblock--drag-and-drop--editor .tab {
    width: 100%;
    background-color: #eee;
    padding: 3px 0;
    position: relative;
}

.xblock--drag-and-drop--editor .tab::after {
  content: "";
  display: table;
  clear: both;
}

.xblock--drag-and-drop--editor .tab h3 {
    font-size: 18px;
}

.xblock--drag-and-drop--editor .tab h4,
.xblock--drag-and-drop--editor .tab .h4 {
    display: block;
    font-size: 16px;
    margin: 20px 0 8px 0;
}

.xblock--drag-and-drop--editor .tab .items-form .item .row:first-of-type .h4 {
    margin-top: 0;
}

.xblock--drag-and-drop--editor .tab-header,
.xblock--drag-and-drop--editor .tab-content {
    width: 96%;
    margin: 2%;
}

.xblock--drag-and-drop--editor .items {
    width: calc(100% - 515px);
    margin: 10px 0 0 0;
}

.xblock--drag-and-drop--editor .target-image-form .background-image-type {
    display: block;
    margin-bottom: 8px;
}

.xblock--drag-and-drop--editor .target-image-form .background-auto {
    margin-top: 20px;
}

.xblock--drag-and-drop--editor .target-image-form input[type="text"] {
    width: 50%;
}
.xblock--drag-and-drop--editor .target-image-form textarea {
    width: 97%;
}

.xblock--drag-and-drop--editor .target-image-form textarea {
    display: block;
}

.xblock--drag-and-drop--editor .target-image-form .background-auto .autozone-layout,
.xblock--drag-and-drop--editor .target-image-form .background-auto .autozone-size {
    width: 4em;
}

.xblock--drag-and-drop--editor input,
.xblock--drag-and-drop--editor textarea {
    box-sizing: border-box;
    font-size: 14px;
    background: #fff;
    box-shadow: none;
    padding: 6px 8px;
    border: 1px solid #b2b2b2;
    color: #4c4c4c;
}

.xblock--drag-and-drop--editor label > span {
    display: inline-block;
    margin-bottom: 0.25em;
}

.xblock--drag-and-drop--editor label.checkbox-label {
    font-size: 14px;
}

/* Main Tab */
.xblock--drag-and-drop--editor .feedback-tab input,
.xblock--drag-and-drop--editor .feedback-tab select {
    display: block;
}

.xblock--drag-and-drop--editor .feedback-tab input[type=checkbox] {
    display: inline-block;
}

/* Zones Tab */
.xblock--drag-and-drop--editor .zones-tab .zone-editor {
  position: relative;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: flex-start;
  justify-content: space-between;
}

.xblock--drag-and-drop--editor .zones-tab .tab-content .controls {
  width: 40%;
  max-width: 50%;
  min-width: 330px;
}

.xblock--drag-and-drop--editor .zones-tab .tab-content .target {
  position: relative;
  border: 1px solid #ccc;
  overflow: hidden;
}
.xblock--drag-and-drop--editor .zones-tab .tab-content .target-img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
}

.xblock--drag-and-drop--editor .zones-form .zone-row {
    background-color: #b1d9f1;
    padding: 1rem;
    margin-bottom: 2rem;
}

.xblock--drag-and-drop--editor .zones-form .zone-row label {
    display: block;
}

.xblock--drag-and-drop--editor .zones-form .zone-row label > span {
    display: inline-block;
    font-size: 14px;
    min-width: 8rem;
}

.xblock--drag-and-drop--editor .zones-form .zone-row label > input {
    width: 63%;
    margin: 0 0 5px;
    line-height: 2.664rem;  /* .title gets line-height from a Studio rule that does not apply to .description;
                               here we make sure that both input fields get the same value for line-height */
}

.xblock--drag-and-drop--editor .zones-form .zone-row .layout {
    margin: 2rem 0;
}

.xblock--drag-and-drop--editor .zones-form .zone-row .layout label {
    display: inline-block;
    width: 45%;
}

.xblock--drag-and-drop--editor .zones-form .zone-row .layout .zone-size,
.xblock--drag-and-drop--editor .zones-form .zone-row .layout .zone-coord {
    width: 35%;
    line-height: inherit;
}

.xblock--drag-and-drop--editor .zones-form .zone-row .alignment {
    margin-bottom: 15px;
}


.xblock--drag-and-drop--editor .feedback-form textarea {
    width: 99%;
    height: 128px;
}

.xblock--drag-and-drop--editor .form-help {
    margin: 0.5rem 0 1rem;
    font-size: 12px;
}

.xblock--drag-and-drop--editor .item-styles-form,
.xblock--drag-and-drop--editor .items-form {
    margin-bottom: 30px;
}

.xblock--drag-and-drop--editor .items-form .item {
    background-color: #b1d9f1;
    padding: 2rem;
    margin-bottom: 2rem;
}

.xblock--drag-and-drop--editor .items-form select {
    width: 35%;
}

.xblock--drag-and-drop--editor .items-form .zone-checkbox {
    width: initial;
}

.xblock--drag-and-drop--editor .items-form .item-text,
.xblock--drag-and-drop--editor .items-form .item-image-url {
    width: 50%;
}

.xblock--drag-and-drop--editor .items-form .item-width {
    width: 50px;
}

.xblock--drag-and-drop--editor .items-form textarea {
    width: 97%;
}

.xblock--drag-and-drop--editor .items-form .row.advanced {
    display: none;
}
.xblock--drag-and-drop--editor .items-form .row.advanced-link {
    font-size: 12px;
    margin-top: 2em;
}
.xblock--drag-and-drop--editor .items-form .row.advanced-link button {
    background: none;
    border: none;
    color: #4c4c4c;
}
.xblock--drag-and-drop--editor .items-form .row.advanced-link button:before {
    content: '\25B6';
    margin-right: 0.5em;
}
.rtl .xblock--drag-and-drop--editor .items-form .row.advanced-link button:before {
    content: '\25C0';
    margin-left: 0.5em;
    margin-right: 0;
}

.xblock--drag-and-drop-editor .items-form .zone-checkbox-row {
    margin-bottom: 0px;
}

/** Buttons **/
.xblock--drag-and-drop--editor .btn {
    background-color: #1d5280;
    color: #fff;
    border: 1px solid #156ab4;
    border-radius: 6px;
    padding: 5px 10px;
}

.xblock--drag-and-drop--editor .btn:hover,
.xblock--drag-and-drop--editor .btn:focus {
    background-color: #296ba5;
    box-shadow: 0 1px 1px rgba(0,0,0,0.5);
}

.xblock--drag-and-drop--editor .remove-zone,
.xblock--drag-and-drop--editor .remove-item {
    float: right;
    padding: 3px;
    border-radius: 12px;
}
.rtl .xblock--drag-and-drop--editor .remove-zone,
.rtl .xblock--drag-and-drop--editor .remove-item {
    float: left;
}

.xblock--drag-and-drop--editor .icon {
    width: 14px;
    height: 14px;
    border-radius: 7px;
    display: inline-block;
}

.xblock--drag-and-drop--editor .remove-zone .icon,
.xblock--drag-and-drop--editor .remove-item .icon {
    display: block;
}

.xblock--drag-and-drop--editor .tab .field-error {
    outline: none;
    box-shadow: 0 0 10px 0 darkred;
    /* Needed because Safari won't show the box-shadow for textareas otherwise. */
    -webkit-appearance: none;
}

.xblock--drag-and-drop--editor .icon.add:before {
    content: '';
    height: 10px;
    width: 2px;
    background-color: #fff;
    position: relative;
    display: inline;
    float: left;
    top: 2px;
    left: 6px;
}

.xblock--drag-and-drop--editor .icon.add:after {
    content: '';
    height: 2px;
    width: 10px;
    background-color: #fff;
    position: relative;
    display: inline;
    float: left;
    top: 6px;
    left: 0;
}

.xblock--drag-and-drop--editor .icon.remove:before {
    content: '';
    height: 10px;
    width: 2px;
    background-color: #fff;
    position: relative;
    display: inline;
    float: left;
    top: 2px;
    left: 6px;
    -webkit-transform: rotate(45deg);
    -ms-transform: rotate(45deg);
    transform: rotate(45deg);
}

.xblock--drag-and-drop--editor .icon.remove:after {
    content: '';
    height: 2px;
    width: 10px;
    background-color: #fff;
    position: relative;
    display: inline;
    float: left;
    top: 6px;
    left: 0;
    -webkit-transform: rotate(45deg);
    -ms-transform: rotate(45deg);
    transform: rotate(45deg);
}
